package com.ruoyi.ai.enums;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;

import java.util.Arrays;

@AllArgsConstructor
@Getter
public enum CalendarAdvanceType {
    JUST_START(0,"日程开始时"),
    FIVE_MINUTE(1, "提前5分钟"),
    TEN_MINUTE(2, "提前10分钟"),
    THIRTY_MINUTE(3, "提前30分钟"),
    ONE_HOUR(4, "提前1小时"),
    ONE_DAY(5, "提前1天"),
    ;
    private Integer type;
    private String desc;

    public static CalendarAdvanceType getByType(Integer type){
        return Arrays.stream(values()).filter(c-> c.getType().equals(type)).findFirst().orElse(null);
    }
}
